home *** CD-ROM | disk | FTP | other *** search
- Path: news.clark.net!not-for-mail
- From: gusty@clark.net (Harlan Messinger)
- Newsgroups: comp.lang.c++
- Subject: Re: Newbie question on syntax of pointer to const
- Date: 30 Jan 1996 17:20:16 GMT
- Organization: Clark Internet Services, Inc., Ellicott City, MD USA
- Message-ID: <4elk0g$bbv@clarknet.clark.net>
- References: <4ej9eg$lq6@agate.berkeley.edu> <00001a81+00009661@msn.com>
- NNTP-Posting-Host: explorer.clark.net
- Mime-Version: 1.0
- Content-Type: TEXT/PLAIN; charset=ISO-8859-1
- Content-Transfer-Encoding: 8bit
-
- Meiyu Lin (CompuWord@msn.com) wrote:
- : (1) const double *pc;
- : This is a pointer to a const object of type double.
- : *pc = 3.14156 the pointer pc is allowed to change
- :
- : (2) double const *pc = 3.14156;
- : This is the pointer is to be declared as constant
- : Since pointer is as constant the value can't be changed.
- :
- : Hope I am right.
- :
-
- You've got it half backwards. See my earlier response.
-